package com.th.service.impl;

import com.th.mapper.ProductTypeMapper;
import com.th.pojo.ProductType;
import com.th.pojo.ProductTypeExample;
import com.th.service.ProductTypeService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @author ThreePure
 * @date 2022/3/27 18:03
 * @description: TODO
 * @since 1.8
 */
@Service("ProductTypeServiceImpl")
public class ProductTypeServiceImpl implements ProductTypeService {

    /**在业务逻辑层一定会有数据访问层对象*/
    @Autowired
    ProductTypeMapper productTypeMapper;

    /**
     * 查询所有商品类别
     */
    @Override
    public List<ProductType> getAll() {
        return productTypeMapper.selectByExample(new ProductTypeExample());
    }
}
